package org.openurp.edu.student.info.service

import org.openurp.platform.api.app.UrpApp
import org.beangle.commons.bean.Initializing
import org.beangle.commons.lang.SystemInfo

/**
 * @author xinzhou
 */
class StudentPortraitService extends Initializing {
  var headPortaitBase: String = _

  override def init(): Unit = {
    println(UrpApp.properties)
    headPortaitBase = UrpApp.properties.get("portrait_base") match {
      case Some(base) => base.asInstanceOf[String]
      case None => SystemInfo.tmpDir
    }
    if (!headPortaitBase.endsWith("/")) headPortaitBase += "/"
  }
}
